]> dgit.raspbian.org Git - gnome-shell.git/commitdiff
cleanup: Use (un)block_signal_handler() convenience wrapper
authorFlorian Müllner <fmuellner@gnome.org>
Wed, 30 Oct 2019 17:11:56 +0000 (18:11 +0100)
committerFlorian Müllner <florian.muellner@gmail.com>
Wed, 30 Oct 2019 19:40:15 +0000 (19:40 +0000)
We now depend on a gjs version that is guaranteed to provide those
more idiomatic wrappers, so use them instead of the clunkier static
methods.

https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/795

js/extensionPrefs/main.js
js/ui/status/brightness.js
js/ui/status/volume.js

index bd696523e8cc214571bf47a1ba2f518f30e5d0a9..b9d34f918e1c2fbaa4191189dfb9a1def363153f 100644 (file)
@@ -579,9 +579,9 @@ class ExtensionRow extends Gtk.ListBoxRow {
                 this._extension = ExtensionUtils.deserializeExtension(newState);
                 let state = (this._extension.state == ExtensionState.ENABLED);
 
-                GObject.signal_handler_block(this._switch, this._notifyActiveId);
+                this._switch.block_signal_handler(this._notifyActiveId);
                 this._switch.state = state;
-                GObject.signal_handler_unblock(this._switch, this._notifyActiveId);
+                this._switch.unblock_signal_handler(this._notifyActiveId);
 
                 this._switch.sensitive = this._canToggle();
             });
index 1abdab47e2c3ad55f2303004f1e031d8dc325906..b6e6ef83659ea2c8019368dab30f751f54799ae8 100644 (file)
@@ -57,9 +57,9 @@ class Indicator extends PanelMenu.SystemIndicator {
     }
 
     _changeSlider(value) {
-        GObject.signal_handler_block(this._slider, this._sliderChangedId);
+        this._slider.block_signal_handler(this._sliderChangedId);
         this._slider.value = value;
-        GObject.signal_handler_unblock(this._slider, this._sliderChangedId);
+        this._slider.unblock_signal_handler(this._sliderChangedId);
     }
 
     _sync() {
index 9109121c4926c39e4fed282b682d6a29f7d71752..a4c7a823fef793fd811e25d009b271ec8395cba7 100644 (file)
@@ -131,9 +131,9 @@ var StreamSlider = class {
     }
 
     _changeSlider(value) {
-        GObject.signal_handler_block(this._slider, this._sliderChangedId);
+        this._slider.block_signal_handler(this._sliderChangedId);
         this._slider.value = value;
-        GObject.signal_handler_unblock(this._slider, this._sliderChangedId);
+        this._slider.unblock_signal_handler(this._sliderChangedId);
     }
 
     _updateVolume() {